
# 111098 1-2-70-21.09.08-147080-10028-SEC 400w数据，7TB


#for rs in `ls *.iso`;do echo $rs;sh get.ban.sh $rs;done | tee -a get.log # bug screen lot of msg
#for rs in `ls *.iso`;do echo $rs;sh get.ban.sh $rs;done  # is ok 


rm -rf /tmp/DMInstall
wget $1 .
mkdir tt
echo $1|awk -F'/' '{print $NF}'
mount `echo $1|awk -F'/' '{print $NF}'` tt
nohup  ./tt/DMInstall.bin  -i &

sleep 3

a=`cat nohup.out|wc -l`
while true
do
if [ $a -gt 10 ];then
break
fi
sleep 3
a=`cat nohup.out|wc -l`
done

cd /tmp/DMInstall/source/bin/
banver=`./disql -id|awk '{print $NF}'`
cd -
cp -r /tmp/DMInstall/source $banver
ps -ef|grep DMInstall|grep -v grep|awk '{print $2}'|xargs kill
rm -rf nohup.out 


##>>>
cd $banver/bin
mv dmserver dmserverwaitkill
./dminit path=data001 port_num=6666

rm -rf nohup.out
nohup ./dmserverwaitkill data001/DAMENG/dm.ini &

sleep 3
flag=`cat nohup.out|grep 'SYSTEM IS READY'|wc -l`
while [ $flag -eq 0 ]
do
sleep 3
flag=`cat nohup.out|grep 'SYSTEM IS READY'|wc -l`
echo $flag" ready dmserver sleep skip!"
done

java -jar /001/dmtest.jar 127.0.0.1:6666 1

killall dmserverwaitkill
rm -rf data001
cd -

#<<<

